package com.china08.yxyapi.entity.mg.user;

import javax.persistence.Id;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import com.china08.yxyapi.entity.mg.MongoBaseEntityNoId;

/**
 * @author Richard.Wang
 *
 */
@Document(collection = "yxy.user.mark")
public class YxyUserMark extends MongoBaseEntityNoId {

    private static final long serialVersionUID = 4061825483346361129L;

    @Id
    private String id;

    /**
     * 用户id
     */
    @Indexed
    @Field(value = "user_id")
    private String userId;

    /**
     * 评价分数
     */
    @Field(value = "res_id")
    private String resId;

    /**
     * 资源评分 1--5分
     */
    @Field(value = "mark")
    private int mark;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getResId() {
        return resId;
    }

    public void setResId(String resId) {
        this.resId = resId;
    }

    public int getMark() {
        return mark;
    }

    public void setMark(int mark) {
        this.mark = mark;
    }
}
